The easiest way to connect to an IRC server is to call M-x erc. If you want to assign this function to a keystroke, the following will help you figure out its parameters.
Select connection parameters and run ERC. Non-interactively, it takes the following keyword arguments.
- server
- port
- nick
- password
- full-name
That is, if called with the following arguments, server and full-name will be set to those values, whereas
erc-compute-port,erc-compute-nickanderc-compute-full-namewill be invoked for the values of the other parameters.(erc :server "irc.freenode.net" :full-name "Harry S Truman")
Return an IRC server name.
This tries a number of increasingly more default methods until a non-nil value is found.
- server (the argument passed to this function)
- The
erc-serveroption- The value of the IRCSERVER environment variable
- The
erc-default-servervariable
Return a port for an IRC server.
This tries a number of increasingly more default methods until a non-nil value is found.
- port (the argument passed to this function)
- The
erc-portoption- The
erc-default-portvariable
Return user's IRC nick.
This tries a number of increasingly more default methods until a non-nil value is found.
- nick (the argument passed to this function)
- The
erc-nickoption- The value of the IRCNICK environment variable
- The result from the
user-login-namefunction
Nickname to use if one is not provided.
This can be either a string, or a list of strings. In the latter case, if the first nick in the list is already in use, other nicks are tried in the list order.
If the nickname you chose isn't available, and this option is non-nil, ERC should automatically attempt to connect with another nickname.
You can manually set another nickname with the /NICK command.
Return user's full name.
This tries a number of increasingly more default methods until a non-nil value is found.
- full-name (the argument passed to this function)
- The
erc-user-full-nameoption- The value of the IRCNAME environment variable
- The result from the
user-full-namefunction